//
//  SuperPlayerViewConfig.m
//  SuperPlayer
//
//  Created by annidyfeng on 2018/10/18.
//

#import "CTSuperPlayerViewConfig.h"
#import "CTSuperPlayerDefines.h"

#if __has_include(<TXLiveSDKTypeDef.h>)
#import <TXLiveSDKTypeDef.h>
#elif __has_include("TXLiveSDKTypeDef.h")
#import "TXLiveSDKTypeDef.h"
#endif

@implementation CTSuperPlayerViewConfig

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.hwAcceleration = YES;
        self.playRate = 1.0;
#if USE_TX_SDK == 1
        self.renderMode = RENDER_MODE_FILL_EDGE;
#endif
        self.maxCacheItem = 5;
        self.playShiftDomain = kTXVideoPlayShiftDomain;
#if DEBUG
        self.enableLog = YES;
#else
        self.enableLog = NO;
#endif
    }
    return self;
}

- (BOOL)hwAcceleration
{
#if TARGET_OS_SIMULATOR
    return NO;
#else
    return _hwAcceleration;
#endif
}

@end
